
{mfdeclre.i}

    DEFINE VARIABLE pass AS LOGICAL INITIAL TRUE NO-UNDO.
    DEFINE VARIABLE errmsg AS CHARACTER INITIAL "" NO-UNDO.
    DEFINE VARIABLE xx AS LOGICAL NO-UNDO.
    DEFINE VARIABLE fname AS CHARACTER NO-UNDO.

    DEFINE VARIABLE fid AS INTEGER NO-UNDO.
    DEFINE VARIABLE tid AS INTEGER NO-UNDO.
    DEFINE VARIABLE ret AS LOGICAL NO-UNDO.
    DEFINE VARIABLE yn AS LOGICAL NO-UNDO.
    DEFINE VARIABLE avail-qty AS DECIMAL NO-UNDO.
    
    pass = TRUE.
    errmsg = "".

    fname = "/data/eb2/hk/txt/sync_pt.txt".

    {gprun.i ""hkbdld.p"" "( INPUT fname, OUTPUT fid, OUTPUT tid)"}
    {gprun.i ""hkbdpro.p"" "(INPUT fid,INPUT tid, OUTPUT ret, OUTPUT errmsg)"}

    IF errmsg <> "" THEN DO:
        OUTPUT TO VALUE("/data/eb2/hk/txt/sync_pt_err.txt").
        PUT UNFORMATTED errmsg SKIP .
        OUTPUT CLOSE.
    END.

